import request from '@/utils/request'

// 查询Carousel列表
export function loadDataList(query) {
	return request({
		url: '/carousel/loadDataList',
		method: 'get',
		params: query
	})
}
// 新增Carousel
export function addCarousel(data) {
	return request({
		url: '/carousel/add',
		method: 'post',
		data: data
	})
}
//查询Carousel详细
export function getCarouselById(carouselId) {
	return request({
		url: '/carousel/getCarouselById/' + carouselId,
		method: 'get',
	})
}
//修改Carousel
export function updateCarouselById(data,carouselId) {
	return request({
		url: '/carousel/updateCarouselById/'+carouselId,
		method: 'put',
		data: data
	})
}
//删除Carousel
export function delCarouselById(carouselId) {
	return request({
		url: '/carousel/deleteCarouselById/'+carouselId,
		method: 'delete',
	})
}

//查询Carousel所有分类
export function getCarouselCategory() {
  return request({
    url: '/carousel/getCarouselCategory',
    method: 'get',
  })
}


//发布Carousel
export function publishCarouselById(carouselId) {
  return request({
    url: '/carousel/publishSyCarousel/'+carouselId,
    method: 'put'
  })
}
